web3.js@0.2x.x web3.version.whisper
web3.version.whisper
Whisper のプロトコルバージョンを返します。
非同期の場合は、次のように記述します。
web3.version.getWhisper(callback(error, result){ ... })
戻り値
String
Whisper のプロトコルバージョン
サンプルコード
code:example.js
// 同期プログラム
var version = web3.version.whisper;
console.log(version); // 20
// 非同期プログラム
web3.version.getWhisper((error, result) => {
console.log(result);
});
動作サンプル
https://piyolab.github.io/sushiether/web3.js_v0.2x.x/web3/web3.version.whisper/
注意: Infura, MetaMask は Whisper をサポートしていないため、この動作サンプルでは undefined が返ります。
ソースコード
https://github.com/piyolab/sushiether/blob/master/web3.js_v0.2x.x/web3/web3.version.whisper/index.html
参考
https://github.com/ethereum/wiki/wiki/JavaScript-API#web3versionwhisper
#todo
Whisper とは何かを説明
#web3.js@0.2x.x #web3.js